package org.dht.com.tra.str;

import org.dht.com.tra.CommunicationManagerWaitingResult;
import org.dht.com.tra.Communicator;

/**
 * The <code>CommunicationManagerStructure</code> class is an
 * <code>CommunicationManagerWaitingResult</code>. Implement all services for
 * send message in data struture. Not require params
 * 
 */
public class CommunicationManagerStructure extends
		CommunicationManagerWaitingResult {

	/**
	 * Instance of CommunicationDataStructure
	 */
	private CommunicationDataStructure communicationDataStructure;

	/**
	 * Builds a CommunicationManagerStructure. Instance a
	 * CommunicationDataStructure and invoke
	 * <code>createMulticastManager()</code>,
	 * <code>createTransferObjectManager()</code> and
	 * <code>createUnicastManager()</code>
	 */
	public CommunicationManagerStructure() {
		communicationDataStructure = new CommunicationDataStructure();
		observableCommunication = communicationDataStructure;

		createMulticastManager();
		createUnicastBigManager();
		createUnicastManager();
	}

	/**
	 * Creates a MulticastManagerStructure
	 */
	protected Communicator createMulticastManager() {
		multicastManager = new MulticastManagerStructure(
				communicationDataStructure, this);

		return multicastManager;
	}

	/**
	 * Creates a TransferObjectManagerStructure
	 */
	protected Communicator createUnicastBigManager() {
		unicastBigManager = new UnicastBigManagerStructure(
				communicationDataStructure, this);

		return unicastBigManager;
	}

	/**
	 * Creates a UnicastManagerStructure
	 */
	protected Communicator createUnicastManager() {
		unicastManager = new UnicastManagerStructure(
				communicationDataStructure, this);

		return unicastManager;
	}

	/**
	 * Not implement
	 */
	public void stop() {

	}

}
